package com.topcheer.common.base.vo;

import lombok.Data;
import org.springframework.http.HttpStatus;

/**
 * @author xutao
 * @Package com.topcheer.common.base.response
 * @Description: ${todo}
 * @date 2020/3/29 22:09
 */
@Data
public class BaseResponse<T> {

    private int code = HttpStatus.OK.value();
    private String msg = HttpStatus.OK.getReasonPhrase();
    private T data;

    public BaseResponse<T> data(T data) {
        this.data = data;
        return this;
    }

    public BaseResponse<T> code(int code) {
        this.code = code;
        return this;
    }

    public BaseResponse<T> msg(String msg) {
        this.msg = msg;
        return this;
    }
}
